<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    {{msg}}
    <hr />
    <!-- v-html
    1、写在标签的属性上
    2、可以解析标签
    3、优先级比插值表达式高
    -->
    <h1 v-html="msg1">{{msg}}</h1>
    <hr />
     <!-- v-text
    1、写在标签的属性上
    2、不可以解析标签
    3、优先级比插值表达式高
    -->
    <h1 v-text="msg2">{{msg}}</h1>
  </div>
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.14/vue.min.js"></script>

  <script>
    new Vue({
      el: "#app",
      data: {
        msg: 'hello  vue',
        msg1: '<div>我是一个div</div>',
        msg2: '<div>我是一个div2222</div>',
      }
    })
  </script>
</body>

</html>